Skip to content

fix(linux): fall back to live CRTC geometry for KMS capture - #5481

Open
ReenigneArcher wants to merge 2 commits into
masterfrom
fix-5047
Open

fix(linux): fall back to live CRTC geometry for KMS capture#5481
ReenigneArcher wants to merge 2 commits into
masterfrom
fix-5047

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

Avoid aborting when the selected DRM card or CRTC is absent from the cached monitor list. Preserve cached geometry when available and add regression coverage for both fallback paths.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Avoid aborting when the selected DRM card or CRTC is absent from the cached monitor list. Preserve cached geometry when available and add regression coverage for both fallback paths.
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 32.69231% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.04%. Comparing base (e553d88) to head (0cbb28c).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/linux/kmsgrab.cpp 0.00% 33 Missing and 1 partial ⚠️
src/platform/linux/kmsgrab.h 94.44% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5481      +/-   ##
==========================================
+ Coverage   26.71%   28.04%   +1.32%     
==========================================
  Files         109      110       +1     
  Lines       24552    24707     +155     
  Branches    10764    10893     +129     
==========================================
+ Hits         6559     6928     +369     
+ Misses      16708    15714     -994     
- Partials     1285     2065     +780     
Flag Coverage Δ
Archlinux 0.00% <0.00%> (ø)
FreeBSD-amd64 14.03% <92.85%> (+0.07%) ⬆️
Homebrew-macos-14 22.53% <100.00%> (+0.07%) ⬆️
Homebrew-macos-15 23.20% <100.00%> (+0.08%) ⬆️
Homebrew-macos-26 23.31% <100.00%> (+0.06%) ⬆️
Homebrew-ubuntu-24.04 13.98% <28.00%> (+0.07%) ⬆️
Linux-AppImage 13.39% <28.00%> (+0.07%) ⬆️
Windows-AMD64 17.36% <84.61%> (+0.07%) ⬆️
Windows-ARM64 15.02% <92.85%> (+0.07%) ⬆️
macOS-arm64 19.93% <92.85%> (?)
macOS-x86_64 20.63% <92.85%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/linux/kmsgrab.h 94.44% <94.44%> (ø)
src/platform/linux/kmsgrab.cpp 3.55% <0.00%> (-0.03%) ⬇️

... and 56 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e553d88...0cbb28c. Read the comment docs.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Last Updated 2026-08-07 17:48:26 UTC
Source Run CI Run #4886
Commit 0cbb28c921e849d70d9c1b7487842a2f3d00d8df

Screenshot Comparison

PR #5481 screenshots vs screenshots baseline.

Matrix: AppImage

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-AMD64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-ARM64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-arm64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-x86_64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KMS capture: "Couldn't find [/dev/dri/card2]: This shouldn't have happened :/" on multi-GPU (NVIDIA dGPU + AMD iGPU) when only iGPU has an active output

1 participant